<?php
/**
 * Created by PhpStorm.
 * User: 王杰
 * Date: 2017/1/4
 * Time: 9:45
 */

namespace Mall\Model;

use Think\Model;

class GoodsCategoryModel extends Model
{
    protected $tableName = 'mall_goods_category';

    protected $_auto = array(
        array('create_time', NOW_TIME, self::MODEL_INSERT)
    );

    public function getCategory()
    {
        $cate = S('goods_category');
        if (empty($cate)) {
            $cate = $this->where('status!=-1')->select();
            S('goods_category',$cate);
        }
        return $cate;
    }

}




